Skip to main content

Testing

This document serves as a guide for the testing practices within the gov.gr ecosystem, aimed at developers implementing and integrating solutions. It helps developers properly set up and execute testing environments for services that interact with gov.gr, offering practical steps, examples, and best practices.

Test Environment

  • Use only URLs starting with https://test.gsis.gr for all testing.
  • Do not use production credentials.
  • Contact KED to obtain sandbox credentials.

Creating Test Users

  • For services using GSIS login, create users in Django admin with vat_number=null.
  • Use mock VAT numbers for testing (e.g., 123456789).
  • Ensure there are no duplicate users with the same VAT values.

Simulating Web Service Calls

  • Use Python scripts with the requests and xmltodict libraries for SOAP services.
  • Post to test endpoints and check responses for errors.
  • Use auditRecord even in test calls.

Local Redirect Usage

  • If you're testing login flows locally, add the redirect URIs to the backend provider.
  • Example: http://localhost:8000/authorize or /admin/authorize
  • Also add the same redirect URIs in your .env file (and in Azure if deploying).

Token Behavior in Testing

  • Tokens in testing have short durations (e.g., 5–15 minutes).
  • If you encounter 401 errors, try repeating the login flow.
  • Also test the behavior when the token expires and needs to be refreshed.

Logging and Log Auditing

  • Use debug-level logging only in test environments.
  • Do not log tokens or sensitive data.
  • Check your audit logs to ensure they include all required fields.

We'd love your feedback
Was this helpful?